const api = require("../../../utils/api")
const getwxphone = require("../../../utils/getwxphone")

Page({
  data: {

  },
  jp() {
    this.setData({
      jp: 1
    })
  },
  gz() {
    this.setData({
      gz: 1
    })
  },
  getPhoneNumber(e) {
    console.log(e)
    const info = {
      area: wx.getStorageSync('area'),
      agent: wx.getStorageSync('agent'),
      page: wx.getStorageSync('page'),
      activeId: 37
    }

    getwxphone(e.detail.code, 51661, 'choujiang', info)
      .then(res => {
        console.log(res);
        wx.navigateTo({
          url: '../index/index',
        })
      })
      .catch(err => {
        console.log(err);
      })
  },

  onLoad: function (options) {
    api.load(options)
  },
  ewm() {
    this.setData({
      ewm: 1,
    })
  },
  zx() {
    wx.navigateTo({
      url: '../zixun/zixun',
    })
  },
  close() {
    this.setData({
      gz: !1,
      jp: !1
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  /**分享到朋友圈*/
  onShareTimeline: function () {

  }
})